package com.domain;

import com.alibaba.fastjson.JSON;
import lombok.Data;

import java.util.HashMap;

@Data
public class SystemDictionaryItem {
    private Long id;

    private Long parentId;
    //标题
    private String title;
    //序号
    private Integer sequence;
    //把字典明细转为json字符串
    public String getJson(){
        HashMap map = new HashMap();
        map.put("id",id);
        map.put("title",title);
        map.put("sequence",sequence);
        map.put("parentId",parentId);
        //不能直接传this进去,会出现死循环
        return JSON.toJSONString(map);
    }
}